/**
 * 
 */
package com.jjt.kiki.util;

import java.util.Map;

import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;

import com.jjt.kiki.vo.model.PageVo;



/**
 * @author jiangjintai
 *
 */
public class MyResponseEntityBuilder {
	public static ResponseEntity<Map<String,Object>> buildSuccessRes(Object content){
		return new ResponseEntity<>(MyMapBuilder.buildSuccessMap(content),HttpStatus.OK);
	}
	public static ResponseEntity<Map<String,Object>> buildSuccessRes(Object content,PageVo page){
		return new ResponseEntity<>(MyMapBuilder.buildSuccessMap(content).put("page", page),HttpStatus.OK);
	}
	public static ResponseEntity<Map<String,Object>> buildErrorRes(String message){
		return new ResponseEntity<>(MyMapBuilder.buildErrorMap(message),HttpStatus.OK);
	}
}
